<?php
/**
 * @version $Id: component.php 5426 2006-10-11 04:38:35Z Jinx $
 * @package Joomla
 * @subpackage Config
 * @copyright Copyright (C) 2005 - 2006 Open Source Matters. All rights reserved.
 * @license GNU/GPL, see LICENSE.php
 * Joomla! is free software. This version may have been modified pursuant to the
 * GNU General Public License, and as distributed it includes or is derivative
 * of works licensed under the GNU General Public License or other free or open
 * source software licenses. See COPYRIGHT.php for copyright notices and
 * details.
 */

jimport( 'joomla.application.component.controller' );

/**
 * Note: this view is intended only to be opened in a popup
 * @package Joomla
 * @subpackage Config
 */
class HelloWorldController_hellotestfoo extends JController
{

	/**
	 * Custom Constructor
	 */
	//DEVNOTE: register task - Register (map) a task to a method in the class
	//function registerTask( $task, $method )	 
	function __construct( $default = array())
	{
		parent::__construct( $default );
		$this->registerTask( 'test','test_method');		
	}

//show_helloworld
	/**
	 * Cancel operation
	 */
	function cancel()
	{
		$this->setRedirect( 'index.php' );
	}
	
	function display() 
  {
  //echo $this->_task;
  //exit;
	   $model = &JModel::getInstance( 'HelloWorldComponentModel' );
		 $table = &$model->getTable();
		
	   $view = new HelloTestFooComponentView( );
	   $view->setModel( $model, true );
	   $view->display();
  } 
  
	function test_method() 
  {
	   $model = &JModel::getInstance( 'HelloWorldComponentModel' );
		 $table = &$model->getTable();
		
	   $view = new HelloTestFooComponentView( );
	   $view->setModel( $model, true );
	   $view->display_test();
  }   
}
?>
